package com.help10000.rms.ui.adapter;

import android.content.Context;

import com.amir.common.beans.BalanceDesc;
import com.amir.common.holder.CommonViewHolder;
import com.amir.common.mvp.base.BaseRecyclerAdapter;
import com.help10000.rms.R;

import java.util.List;

public class WalletDescAdapter extends BaseRecyclerAdapter<BalanceDesc> {

    public WalletDescAdapter(Context context, List<BalanceDesc> dataList, int layoutId) {
        super(context, dataList, layoutId);
    }

    @Override
    protected void bindData(CommonViewHolder holder, BalanceDesc data, int position) {
        holder.setText(R.id.tv_name, data.getItemName());
        holder.setText(R.id.tv_money, data.getJinEr());
        holder.setText(R.id.tv_date, data.getCreateDate());
        holder.setText(R.id.orderIdTv, data.getOrderId());

        holder.setText(R.id.tv_walletMoney, String.format(mContext.getResources().getString(R.string.wallet_money_format), data.getBalance()));
    }
}
